package com.edu.mapper;

import com.edu.bean.Book;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BookMapper{

    @Select("SELECT * FROM book WHERE bookId = #{bookId}")
    Book selectBookById(int bookId);

    @Select("SELECT * FROM book")
    List<Book> selectBooks();

    @Insert("INSERT INTO book(bookName,bookPrice) VALUES (#{bookName},#{bookPrice})")
    int insertBook(Book book);
}
